package cn.com.lms.business.cc.controller;

import cn.com.lms.business.cc.persistence.entity.ExamQuestionCategory;
import cn.com.lms.business.cc.service.CCQuestionCategoryService;
import cn.com.lms.business.exam.persistence.entity.QuestionCategory;
import com.bnzj.core.rest.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cc/exam/question/category")
public class CCQuestionCategoryController {

    @Autowired
    CCQuestionCategoryService questionCategoryService;

    //获取树形结构
    @RequestMapping("/getTreeCategory")
    public ResponseResult<?> getTree(){

        List<ExamQuestionCategory> questionCategoryList = questionCategoryService.getTree();
        return ResponseResult.success(questionCategoryList);

    }

}
